/* eslint-disable @typescript-eslint/no-explicit-any */
// manager.ts
import { Base } from './base'
import { Request } from './request'
class manager {
  /* word接口模块 */
  public static word = {
    getInfo: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/word/info`, params),

    getList: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/word/list`, params),

    add: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/word/add`, params),

    edit: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/word/edit`, params),

    delete: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/word/delete`, params),

    editTypeList: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/word/editTypeList`, params)
  };

  public static user = {
    getInfo: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/user/info`, params),

    getList: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/user/list`, params),

    add: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/user/add`, params),

    edit: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/user/edit`, params)
  };

  public static category = {
    getInfo: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/category/info`, params),

    getList: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/category/list`, params),

    add: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/category/add`, params),

    edit: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/category/edit`, params),

    getAll: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/category/all`, params)
  };

  public static hotnew = {
    getInfo: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/hotnew/info`, params),

    getList: (params?: any): Promise<any> =>
      Request.get(`${Base.env}/api/hotnew/list`, params),

    add: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/hotnew/add`, params),

    edit: (params?: any): Promise<any> =>
      Request.post(`${Base.env}/api/hotnew/edit`, params)
  };
}
export { manager }
